public class Test3_1 {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        for (int i = 100; i <= 999; i++) {
            int a = i / 100;         
            int b = (i / 10) % 10;   
            int c = i % 10;          
            int sum = a * a * a + b * b * b + c * c * c;
            if (sum == i) {
                if (sb.length() > 0) sb.append(",");
                sb.append(i);
            }
        }
        System.out.println(sb.toString());
    }
}

